﻿using System.Collections;
using UnityEngine;

namespace Assets.HitNumber.Demo
{
    public class lookat : MonoBehaviour
    {
        public Transform Point;
        public Vector3 up;

        public Vector3 r= new Vector3(90,0,0);
        // Update is called once per frame
        void Update()
        {

            var dir = Point.position - transform.position;
            var quaternion = Quaternion.LookRotation(dir, up);
            transform.eulerAngles = quaternion.eulerAngles;
            transform.Rotate(r);
        }
    }
}